package org.lanqiao.ssm.common.zk.zkClient;

import org.I0Itec.zkclient.ZkClient;
import org.apache.zookeeper.CreateMode;

public class ZkclientTest {
	private ZkClient zkclient = null;
	public ZkclientTest(){
		this.zkclient = new ZkClient("192.168.0.107:2181",5000);
	}
	
	public void createPersistentNode(String path,Object data){
		//zkclient.createPersistent(path, data);
		zkclient.create(path, data, CreateMode.PERSISTENT);
	}
	public static void main(String[] args) {
		ZkclientTest zt = new ZkclientTest();
		zt.createPersistentNode("/zkclient", "zkclientnode2");
		
	}

}
